package capricornus.scene.controller
{
	import capricornus.events.LoaderEvent;
	import capricornus.net.Path;
	import capricornus.net.loader.SingleUrlLoader;
	import capricornus.scene.AbstractScene;
	
	import flash.utils.ByteArray;

	public class ActionSceneDataController
	{
		private var _scene:AbstractScene;
		
		private var _byteData:ByteArray;
		
		private var _loader:SingleUrlLoader;
		
		public function ActionSceneDataController( scene:AbstractScene )
		{
			init();
		}
		
		private function init():void
		{
			_loader = new SingleUrlLoader();
			_loader.addEventListener( LoaderEvent.LOAD_COMPLETE, onDataLoadedComplete, false, 0, true );
		}
		
		public function sceneIDChange( id:String ):void
		{
			if( _byteData != null ) _byteData.clear();
			_loader.load( Path.getSceneDataPath( id ) );
		}
		
		private function onDataLoadedComplete( e:LoaderEvent ):void
		{
			
		}
	}
}